package com.qiku.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qiku.mapper.AdDao;
import com.qiku.entity.PromotionAd;
import com.qiku.service.AdService;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class AdServiceImpl extends ServiceImpl<AdDao,PromotionAd> implements AdService {

    @Override
    public List<PromotionAd> getAdBySpaceId(Integer sid) {
        LambdaQueryWrapper<PromotionAd> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(PromotionAd::getSpaceId,sid);
        return list(queryWrapper);
    }
}
